<div class="container">
    <div class="lite-chatbox">
        {% for item in chats %}
        <hr />
        {% if item["from_user_id"]==userId %}

        <div class="cright cmsg">
            <img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;"
                src="{{ url_for('static', filename='img/me.png') }}" />
            <span class="name"><span class="htitle owner">我</span><strong>{{item["added_time"]}}</strong>
            </span>
            <span class="content">{{item["content"]}}</span>
        </div>
        {% else %}
        <div class="cleft cmsg">
            <img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;"
                src="{{ url_for('static', filename='img/others.png') }}" />
            <span class="name"><span class="htitle owner">{{other_name}}</span><strong>{{item["added_time"]}}</strong>
            </span>
            <span class="content"> {{item["content"]}}</span>
        </div>
        {% endif %}
        {% endfor %}
    </div>
</div>